package com.cly.authCode.controller;

/**
 *  验证码控制器
 */

import com.cly.authCode.service.AuthCodeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@Slf4j
@RequestMapping("/authCode")
public class AuthCodeController {
    @Autowired
    private AuthCodeService authCService;
    @RequestMapping("/public/send/login")
    public void sendLoginAuthCode(@RequestParam ("phoneNumber") String phoneNumber)
    {
        authCService.sendLoginAuthCode(phoneNumber);
    }
    @RequestMapping("/public/send/register")
    public void sendAuthCodeRegister(@RequestParam ("phoneNumber") String phoneNumber)
    {
        authCService.sendRegisterAuthCode(phoneNumber);
    }

}
